﻿/// <reference path="../Scripts/jquery-1.4.1-vsdoc.js">
var uploadedFiles = new Array();

function PrepareUploadify(albumid) {
    $('#fileInput').uploadify({
        'uploader': relRootPath + '/Scripts/uploadify/uploadify.swf',
        'script': relRootPath + '/Services/UploadFileHandler.ashx',
        'scriptData': { 'userid': userid, 'albumid': albumid },
        'cancelImg': relRootPath + '/Content/images/icons/cancel.png',
        'auto': true,
        'multi': true,
        'fileDesc': '图片格式',
        'fileExt': '*.jpg;*.png;*.gif;*.bmp;*.jpeg',
        'queueSizeLimit': 20,
        'sizeLimit': 2000000,
        'simUploadLimit': 1,
        'width': 124,
        'height': 42,
        'buttonImg':relRootPath+"/Content/themes/redmond/images/selectfile.png",
        //'buttonText': "选择相片",
        'onAllComplete': function(event, data) {
            //alert("completed");
        },
        'onSelected': function(event, queueID, fileObj) {
            //alert(fileObj.size);
            return true;
        },
        'onComplete': function(event, queueID, fileObj, response, data) {
            fileObj.Path = response;
            uploadedFiles.push(fileObj);
        }
    });
}
